package justtry.sort;

import java.util.List;

/**
 * Created by weishaofei on 2017/12/11.
 */
public abstract class Sort {

    public abstract void sort(List<Integer> list);

    protected void exchange(List<Integer> list, int res, int des) {
        int temp = list.get(res);
        list.set(res, list.get(des));
        list.set(des, temp);
    }

    protected boolean less(List<Integer> list, int i, int j) {
        if (list.get(i) < list.get(j)) {
            return true;
        }
        return false;
    }
}
